package com.kgc.cgprovider.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.cgapi.service.GYBJServiceApi;
import com.kgc.cgprovider.service.GYBJService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class GYBJController implements GYBJServiceApi {
    private Logger logger = LoggerFactory.getLogger(GYBJController.class);

    @Resource
    private GYBJService gybjService;


    @Override
    public ResponseMsg getGYBJPage(Map<String, Object> map) {
        ResponseMsg responseMsg = gybjService.getPage(map);
        return responseMsg;
    }

    @Override
    public ResponseMsg addGYBJ(Map<String, Object> map) {
        ResponseMsg responseMsg = gybjService.addGYBJ(map);
        return responseMsg;
    }

    @Override
    public ResponseMsg getGYBJ(String code) {
        ResponseMsg responseMsg = gybjService.getGYBJ(code);
        return responseMsg;
    }

    @Override
    public ResponseMsg modiGYBJ(Map<String, Object> map) {
        ResponseMsg responseMsg = gybjService.modiGYBJ(map);
        return responseMsg;
    }

    @Override
    public ResponseMsg getGYBJByCGXJ(String xj_code) {
        ResponseMsg responseMsg = gybjService.getGYBJByCGXJ(xj_code);
        return responseMsg;
    }
}
